package com.wolfking.jeesite.freemarker.method;

import com.wolfking.jeesite.freemarker.FreemarkerMethod;
import com.wolfking.jeesite.sso.SsoService;
import freemarker.template.TemplateMethodModelEx;
import freemarker.template.TemplateModelException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * freemarker的权限的标签
 * <p>
 *
 * @author wolfking@赵伟伟
 * @mail zww199009@163.com
 * @创作日期 2017年4月28日下午3:50:30
 * @版权 归wolfking所有
 */
@Slf4j
@FreemarkerMethod("getPermission")
public class GetPermissionMethod implements TemplateMethodModelEx {

    @Autowired
    private SsoService ssoService;

    @Override
    public Object exec(List list) throws TemplateModelException {
        return ssoService.getUserAuthCodes();
    }
}
